﻿using System.Collections.Generic;
using System.Data.SqlClient;
using KZ.Express.H.DAL;

namespace KZ.Express.H.DAL
{
    public class PartnerPriceListDAL : BaseDAL
    {
        /// <summary>
        /// Insert into database
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void Insert(int priceListID, string partnerID)
        {
            List<SqlParameter> parameters = new List<SqlParameter>();
            parameters.Add(new SqlParameter("PriceListID", priceListID));
            parameters.Add(new SqlParameter("PartnerID", partnerID));

            _helper.ExecuteNonQuery("proc_PartnerPriceList_Insert", parameters.ToArray());
        }

        public void Delete(string priceListID)
        {
            List<SqlParameter> parameters = new List<SqlParameter>();
            parameters.Add(new SqlParameter("PriceListID", priceListID));

            _helper.ExecuteNonQuery("proc_PartnerPriceList_Delete", parameters.ToArray());
        }
    }
}